winbrew_core\fs\archive\platform/
mod.rs

1use std::fs;
2use std::io;
3use std::path::Path;
4
5use super::types::PathInfo;
6
7pub(crate) trait PlatformAdapter {
8    fn inspect_path(path: &Path) -> io::Result<PathInfo>;
9
10    fn create_extraction_target_file(path: &Path) -> io::Result<fs::File>;
11}
12
13#[cfg(not(windows))]
14mod portable;
15#[cfg(windows)]
16mod windows;
17
18#[cfg(windows)]
19pub(super) struct WindowsPlatform;
20
21#[cfg(not(windows))]
22pub(super) struct PortablePlatform;